//
//  TestThemeBase.m
//  MKUITestApp
//
//  Created by 苏尚进 on 2021/3/20.
//  Copyright © 2021 moon. All rights reserved.
//

#import "TestThemeBase.h"

@implementation TestThemeBase
- (id)init{
    if (self=[super init]) {
    }
    return self;
}
- (UIColor *)bgBarColor{
    return self.dark?[UIColor blackColor]:[UIColor whiteColor];
}
- (UIColor *)bgColor{
    return self.dark?[UIColor blackColor]:[UIColor whiteColor];
}
- (NSString *)fontColorString{
    return self.dark?@"#ffff":@"#000";
}
- (UIColor *)fontColor{
    return [UIColor mktheme_colorWithString:self.fontColorString];
}
- (CGColorRef)fontColorRef{
    return self.fontColor.CGColor;
}
- (CGFloat)borderWidth{
    return 1.0;
}
- (nonnull CGColorRef)borderColorRef {
    return self.fontColor.CGColor;
}
- (UIColor *)labelColor{
    return self.fontColor;
}
- (UIFont *)labelFont{
    return [UIFont systemFontOfSize:12];
}
- (UITableViewCellSelectionStyle)selectionStyle{
    return self.dark?UITableViewCellSelectionStyleBlue:UITableViewCellSelectionStyleGray;
}
- (UIImage *)buttonIcon{
    return [UIImage imageNamed:self.buttonIconName];
}
- (NSString *)buttonIconName{
    return @"app-icon-2.png";
}
- (NSString *)buttonHighlightIconName{
    return @"app-icon-3.png";
}
- (NSString *)buttonSelectedIconName{
    return @"app-icon-4.png";
}
- (UIEdgeInsets)margin{
    return UIEdgeInsetsMake(10, 10, 10, 10);
}
- (CGFloat)interitemSpacing{
    return 10;
}

//+ (void)load{
//    TestThemeBase *t = [[TestThemeBase alloc] init];
//    SEL sel = @selector(fontColorRef);
//    NSMethodSignature *sig = [t methodSignatureForSelector:sel];
//    const char *methodReturnType = sig.methodReturnType;
//    const char *methodReturnTypeInt = @encode(NSInteger);
//    const char *methodReturnTypeColor2 = @encode(UIColor *);
//    const char *methodReturnTypeCGColorRef = @encode(CGColorRef);
//    const char *methodReturnTypeCGFloat = @encode(CGFloat);
//    const char *methodReturnTypeUITableViewCellSelectionStyle = @encode(UITableViewCellSelectionStyle);
//    const char *methodReturnTypeTestThemeBase = @encode(TestThemeBase);
//    
//    const char *methodReturnTypeCGSize= @encode(CGSize);
//    NSInvocation *invo = [NSInvocation invocationWithMethodSignature:sig];
//    invo.target = t;
//    invo.selector = sel;
//    [invo invoke];
//    id value = nil;
//    if(strcmp(methodReturnType, @encode(NSInteger))==0){
//        NSInteger v = 0;
//        [invo getReturnValue:&v];
//        value = @(v);
//    }else{
//        [invo getReturnValue:&value];
//    }
//    
////    NSNumber *number = (NSNumber *)value;
////    
////    id v13 = [t performSelector:@selector(labelColor)];
////    id v1 = [t performSelector:@selector(borderWidth)];
//////    id v2 = [t performSelector:@selector(borderInt)];
////    id v3 = [t performSelector:@selector(borderNumber)];
////    id v4 = [t performSelector:@selector(emunNumber)];
//    NSLog(@"t");
//}
@end
